-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't check if folders are empty for move instead of copy #9950
Conversation
@@ -406,7 +406,7 @@ def process(self, resource_name=None, force=False, is_priority=None, delete_on=F | |||
self.log_and_output('Missed file: {missed_file}', level=logging.WARNING, **{'missed_file': missed_file}) | |||
|
|||
if all([app.USE_TORRENTS, app.TORRENT_SEED_LOCATION, | |||
self.process_method in ('hardlink', 'symlink', 'reflink', 'copy')]): | |||
self.process_method in ('hardlink', 'symlink', 'reflink', 'keeplink', 'copy')]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added the keeplink because it is added here, meaning it would never get removed from the list otherwise.
Medusa/medusa/post_processor.py
Lines 1316 to 1322 in 25e7b60
if not self.nzb_name and all([app.USE_TORRENTS, app.TORRENT_SEED_LOCATION, | |
self.process_method in ('hardlink', 'symlink', 'reflink', 'keeplink', 'copy')]): | |
# Store self.info_hash and self.release_name so later we can remove from client if setting is enabled | |
if self.info_hash: | |
existing_release_names = app.RECENTLY_POSTPROCESSED.get(self.info_hash, []) | |
existing_release_names.append(self.release_name or 'N/A') | |
app.RECENTLY_POSTPROCESSED[self.info_hash] = existing_release_names |
check_empty = False if self.process_method == 'copy' else True | ||
if self.delete_folder(path, check_empty=check_empty): | ||
if not app.NO_DELETE and os.path.normpath(path) != os.path.normpath(app.TV_DOWNLOAD_DIR): | ||
if self.delete_folder(path, check_empty=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is what is really meant here... I may be wrong, but it makes most sense to me.
This is the only way this makes sense to me. I don't know why we should delete any files on copy? Quite confusing.